//**************************************************************************************
// Task Generated Class File
//**************************************************************************************
//**** DO NOT CHANGE THIS FILE.  THE CONTENTS WILL BE OVERRIDEN ON NEXT MODEL SAVE. ****
//**************************************************************************************
using System;
using System.ComponentModel;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Validation;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
using DevExpress.Xpo;

namespace Liekhus.TimeTracker.Module
{
    [ImageName("Tasks")]
    [CreatableItem(true)]
    [NavigationItem(true)]
    [DefaultListViewOptions()]
    [DefaultProperty("Name")]
    public partial class Task : BaseObject
    {
        #region Constructor
        public Task() : base()
        {
        }

        public Task(Session session) : base(session)
        {
        }
        #endregion

        #region Properties
        private String m_name;
        [Size(100)]
        [RuleRequiredField("Task_Name_RuleRequiredField", DefaultContexts.Save, "Task Name is required.")]
        public String Name
        {
            get { return m_name; }
            set { SetPropertyValue("Name", ref m_name, value); }
        }

        private String m_description;
        [Size(2500)]
        public String Description
        {
            get { return m_description; }
            set { SetPropertyValue("Description", ref m_description, value); }
        }

        private DateTime m_createdOn;
        public DateTime CreatedOn
        {
            get { return m_createdOn; }
            set { SetPropertyValue("CreatedOn", ref m_createdOn, value); }
        }

        private DateTime m_modifiedOn;
        public DateTime ModifiedOn
        {
            get { return m_modifiedOn; }
            set { SetPropertyValue("ModifiedOn", ref m_modifiedOn, value); }
        }

        private DateTime m_deletedOn;
        public DateTime DeletedOn
        {
            get { return m_deletedOn; }
            set { SetPropertyValue("DeletedOn", ref m_deletedOn, value); }
        }

        private DateTime m_completedOn;
        public DateTime CompletedOn
        {
            get { return m_completedOn; }
            set { SetPropertyValue("CompletedOn", ref m_completedOn, value); }
        }

        private TaskStatus m_status;
        [Association("Liekhus.TimeTracker.TaskStatusTask")]
        public TaskStatus Status
        {
            get { return m_status; }
            set { SetPropertyValue("Status", ref m_status, value); }
        }

        private CoveyQuandrant m_coveyQuandrant;
        [Association("Liekhus.TimeTracker.CoveyQuandrantTask")]
        public CoveyQuandrant CoveyQuandrant
        {
            get { return m_coveyQuandrant; }
            set { SetPropertyValue("CoveyQuandrant", ref m_coveyQuandrant, value); }
        }

        private CoveyRole m_coveyRole;
        [Association("Liekhus.TimeTracker.CoveyRoleTask")]
        public CoveyRole CoveyRole
        {
            get { return m_coveyRole; }
            set { SetPropertyValue("CoveyRole", ref m_coveyRole, value); }
        }

        [Association("Liekhus.TimeTracker.TaskTaskNote")]
        public XPCollection<TaskNote> Notes
        {
            get
            {
                return GetCollection<TaskNote>("Notes");
            }
        }

        #endregion
    }
}
